package org.tigris.subversion.svnant.commands;

import java.io.File;
import org.tigris.subversion.svnant.SvnAntUtilities;
import org.tigris.subversion.svnclientadapter.ISVNClientAdapter;
import org.tigris.subversion.svnclientadapter.SVNClientException;
import org.tigris.subversion.svnclientadapter.SVNRevision;
import org.tigris.subversion.svnclientadapter.SVNUrl;

public class Export extends SvnCommand
{
  private static final String MSG_CANT_EXPORT = "Can't export";
  private boolean force = false;
  private SVNUrl srcUrl = null;
  private File srcPath = null;
  private File destPath = null;
  private SVNRevision revision = SVNRevision.HEAD;

  public void execute()
  {
    try
    {
      if (this.srcUrl != null)
        getClient().doExport(this.srcUrl, this.destPath, this.revision, this.force);
      else
        getClient().doExport(this.srcPath, this.destPath, this.force);
    }
    catch (SVNClientException localSVNClientException)
    {
      throw ex(localSVNClientException, "Can't export", new Object[0]);
    }
  }

  protected void validateAttributes()
  {
    SvnAntUtilities.attrNotNull("destPath", this.destPath);
    SvnAntUtilities.attrNotNull("revision", this.revision);
    SvnAntUtilities.attrsNotSet("srcUrl, srcPath", true, new Object[] { this.srcUrl, this.srcPath });
  }

  public void setRevision(String paramString)
  {
    this.revision = getRevisionFrom(paramString);
  }

  public void setSrcUrl(SVNUrl paramSVNUrl)
  {
    this.srcUrl = paramSVNUrl;
  }

  public void setSrcPath(File paramFile)
  {
    this.srcPath = paramFile;
  }

  public void setDestPath(File paramFile)
  {
    this.destPath = paramFile;
  }

  public void setForce(boolean paramBoolean)
  {
    this.force = paramBoolean;
  }
}

/* Location:           C:\Users\Administrator\Desktop\svnant.jar
 * Qualified Name:     org.tigris.subversion.svnant.commands.Export
 * JD-Core Version:    0.6.0
 */